package string;

public class StringDemo02 {
    public static void main(String[] args) {
        /*
         * 字符串对象是不变的
         * 字符串对象一旦创建，就不在改变
         */
        String s1 = "ABC";
        String s2 = "DEF";
        String s3 = s1;
        s1 = s1+s2; //连接字符串
        System.out.println(s1);
        System.out.println(s3);
    }
}
